;; Compile Options : /TM610409 /MS /near /Imain /Iclk /IINTERR~1 /Ikey /Ilcd /Ilcdshow /Imelody /Iport /Ircadc /Itemphum /Itimers /IMACROA~1 /Ieternity /ICLKbuzz /SD /Ol /Og /Oa /W 1 /Fa_output\_obj\ /Zs 
;; Version Number  : Ver.3.54.3
;; File Name       : time.c

	type (M610409) 
	model small, near
	$$NINITVAR segment data 2h #0h
	$$NINITTAB segment table 2h any
	$$TM0CON0_init$time segment code 2h #0h
	$$TM0CON1_init$time segment code 2h #0h
	$$TM0C_init$time segment code 2h #0h
	$$TM0D_init$time segment code 2h #0h
	$$TM1CON0_init$time segment code 2h #0h
	$$TM1CON1_init$time segment code 2h #0h
	$$TM1C_init$time segment code 2h #0h
	$$TM1D_init$time segment code 2h #0h
	$$TM2CON0_init$time segment code 2h #0h
	$$TM2CON1_init$time segment code 2h #0h
	$$TM2C_init$time segment code 2h #0h
	$$TM2D_init$time segment code 2h #0h
	$$TM3CON0_init$time segment code 2h #0h
	$$TM3CON1_init$time segment code 2h #0h
	$$TM3C_init$time segment code 2h #0h
	$$TM3D_init$time segment code 2h #0h
CVERSION 3.54.3
CGLOBAL 01H 03H 0000H "TM3D_init" 08H 02H 06H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM0D_init" 08H 02H 00H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM1D_init" 08H 02H 02H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM2D_init" 08H 02H 04H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM0CON0_init" 08H 02H 08H 00H 80H 04H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM1CON1_init" 08H 02H 0DH 00H 80H 04H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM2CON1_init" 08H 02H 0EH 00H 80H 04H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM3CON1_init" 08H 02H 0FH 00H 80H 04H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM0C_init" 08H 02H 01H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM1C_init" 08H 02H 03H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM2C_init" 08H 02H 05H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM3C_init" 08H 02H 07H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM0CON1_init" 08H 02H 0CH 00H 80H 04H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM1CON0_init" 08H 02H 09H 00H 80H 00H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM2CON0_init" 08H 02H 0AH 00H 82H 04H 00H 00H 01H
CGLOBAL 01H 03H 0000H "TM3CON0_init" 08H 02H 0BH 00H 80H 00H 00H 00H 01H
CSTRUCTTAG 0000H 0000H 0000H 0008H 00000001H "_Notag"
CSTRUCTMEM 52H 00000001H 00000000H "b0" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000001H "b1" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000002H "b2" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000003H "b3" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000004H "b4" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000005H "b5" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000006H "b6" 02H 00H 00H
CSTRUCTMEM 52H 00000001H 00000007H "b7" 02H 00H 00H
CENUMTAG 0000H 0000H 0001H 0004H "TIMmode_value"
CENUMMEM 00000000H "time_one"
CENUMMEM 00000001H "time_two"
CENUMMEM 00000002H "time_three"
CENUMMEM 00000003H "time_four"
CTYPEDEF 0000H 0000H 42H "uint8" 02H 00H 00H
CTYPEDEF 0000H 0000H 42H "DWORD" 02H 00H 02H
CTYPEDEF 0000H 0000H 43H "INT8" 02H 00H 00H
CTYPEDEF 0000H 0000H 42H "uint32" 02H 00H 02H
CTYPEDEF 0000H 0000H 42H "uint16" 02H 00H 01H
CTYPEDEF 0000H 0000H 42H "byte" 02H 00H 00H
CTYPEDEF 0000H 0000H 43H "INT32" 02H 00H 02H
CTYPEDEF 0000H 0000H 43H "INT16" 02H 00H 01H
CTYPEDEF 0000H 0000H 42H "dword" 02H 00H 02H
CTYPEDEF 0000H 0000H 43H "int8" 02H 00H 00H
CTYPEDEF 0000H 0000H 42H "UINT" 02H 00H 01H
CTYPEDEF 0000H 0000H 42H "WORD" 02H 00H 01H
CTYPEDEF 0000H 0000H 43H "int16" 02H 00H 01H
CTYPEDEF 0000H 0000H 43H "int32" 02H 00H 02H
CTYPEDEF 0000H 0000H 42H "UINT8" 02H 00H 00H
CTYPEDEF 0000H 0000H 42H "uint" 02H 00H 01H
CTYPEDEF 0000H 0000H 42H "uchar" 02H 00H 00H
CTYPEDEF 0000H 0000H 42H "UINT16" 02H 00H 01H
CTYPEDEF 0000H 0000H 42H "UINT32" 02H 00H 02H
CTYPEDEF 0000H 0000H 42H "word" 02H 00H 01H
CTYPEDEF 0000H 0000H 42H "BOOL" 02H 00H 00H
CTYPEDEF 0000H 0000H 42H "BYTE" 02H 00H 00H
CTYPEDEF 0000H 0000H 43H "_BYTE_FIELD" 04H 00H 05H 00H 00H
CGLOBAL 01H 42H 0004H "TIME_CLK_MODE" 05H 01H 04H 00H 00H 00H
CFILE 0001H 00000822H "E:\\IDEU8\\Inc\\m610409.h"
CFILE 0002H 00000039H "timers\\time.h"
CFILE 0003H 00000022H "MACROA~1\\MacroAndConst.h"
CFILE 0000H 00000154H "timers\\time.c"

	rseg $$TM0D_init$time
CFUNCTION 0

_TM0D_init	:
CBLOCK 0 1 24

;; {
CLINEA 0000H 0001H 0018H 0002H 0002H
CBLOCK 0 2 24
CARGUMENT 46H 0001H 0000H "TM_0D" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 001EH 0008H 0008H
CBLOCKEND 0 2 31

;; }
CLINEA 0000H 0000H 001FH 0002H 0002H
	rt
CBLOCK 0 3 31
CBLOCKEND 0 3 31
CBLOCKEND 0 1 31
CFUNCTIONEND 0


	rseg $$TM1D_init$time
CFUNCTION 2

_TM1D_init	:
CBLOCK 2 1 41

;; {
CLINEA 0000H 0001H 0029H 0002H 0002H
CBLOCK 2 2 41
CARGUMENT 46H 0001H 0000H "TM_1D" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 002FH 0008H 0008H
CBLOCKEND 2 2 48

;; }
CLINEA 0000H 0000H 0030H 0002H 0002H
	rt
CBLOCK 2 3 48
CBLOCKEND 2 3 48
CBLOCKEND 2 1 48
CFUNCTIONEND 2


	rseg $$TM2D_init$time
CFUNCTION 4

_TM2D_init	:
CBLOCK 4 1 58

;; {
CLINEA 0000H 0001H 003AH 0002H 0002H
CBLOCK 4 2 58
CARGUMENT 46H 0001H 0000H "TM_2D" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 0040H 0008H 0008H
CBLOCKEND 4 2 65

;; }
CLINEA 0000H 0000H 0041H 0002H 0002H
	rt
CBLOCK 4 3 65
CBLOCKEND 4 3 65
CBLOCKEND 4 1 65
CFUNCTIONEND 4


	rseg $$TM3D_init$time
CFUNCTION 6

_TM3D_init	:
CBLOCK 6 1 75

;; {
CLINEA 0000H 0001H 004BH 0002H 0002H
CBLOCK 6 2 75
CARGUMENT 46H 0001H 0000H "TM_3D" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 0051H 0008H 0008H
CBLOCKEND 6 2 82

;; }
CLINEA 0000H 0000H 0052H 0002H 0002H
	rt
CBLOCK 6 3 82
CBLOCKEND 6 3 82
CBLOCKEND 6 1 82
CFUNCTIONEND 6


	rseg $$TM0C_init$time
CFUNCTION 1

_TM0C_init	:
CBLOCK 1 1 93

;; {
CLINEA 0000H 0001H 005DH 0002H 0002H
CBLOCK 1 2 93
CARGUMENT 46H 0001H 0000H "TM_0C" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 0063H 0008H 0008H
CBLOCKEND 1 2 100

;; }
CLINEA 0000H 0000H 0064H 0002H 0002H
	rt
CBLOCK 1 3 100
CBLOCKEND 1 3 100
CBLOCKEND 1 1 100
CFUNCTIONEND 1


	rseg $$TM1C_init$time
CFUNCTION 3

_TM1C_init	:
CBLOCK 3 1 110

;; {
CLINEA 0000H 0001H 006EH 0002H 0002H
CBLOCK 3 2 110
CARGUMENT 46H 0001H 0000H "TM_1C" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 0074H 0008H 0008H
CBLOCKEND 3 2 117

;; }
CLINEA 0000H 0000H 0075H 0002H 0002H
	rt
CBLOCK 3 3 117
CBLOCKEND 3 3 117
CBLOCKEND 3 1 117
CFUNCTIONEND 3


	rseg $$TM2C_init$time
CFUNCTION 5

_TM2C_init	:
CBLOCK 5 1 127

;; {
CLINEA 0000H 0001H 007FH 0002H 0002H
CBLOCK 5 2 127
CARGUMENT 46H 0001H 0000H "TM_2C" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 0085H 0008H 0008H
CBLOCKEND 5 2 134

;; }
CLINEA 0000H 0000H 0086H 0002H 0002H
	rt
CBLOCK 5 3 134
CBLOCKEND 5 3 134
CBLOCKEND 5 1 134
CFUNCTIONEND 5


	rseg $$TM3C_init$time
CFUNCTION 7

_TM3C_init	:
CBLOCK 7 1 144

;; {
CLINEA 0000H 0001H 0090H 0002H 0002H
CBLOCK 7 2 144
CARGUMENT 46H 0001H 0000H "TM_3C" 02H 00H 00H

;;       }
CLINEA 0000H 0000H 0096H 0008H 0008H
CBLOCKEND 7 2 151

;; }
CLINEA 0000H 0000H 0097H 0002H 0002H
	rt
CBLOCK 7 3 151
CBLOCKEND 7 3 151
CBLOCKEND 7 1 151
CFUNCTIONEND 7


	rseg $$TM0CON0_init$time
CFUNCTION 8

_TM0CON0_init	:
CBLOCK 8 1 169

;; {
CLINEA 0000H 0001H 00A9H 0002H 0002H
	push	xr8
	mov	er8,	er0
	mov	er10,	er2
CBLOCK 8 2 169
CARGUMENT 46H 0002H 0028H "T0_CS" 02H 00H 01H
CARGUMENT 46H 0002H 0029H "T0M16" 02H 00H 01H

;;   if(T0_CS > time_four || T0M16 > TIME_HIGH ){
CLINEA 0000H 0001H 00AAH 0004H 002FH
	cmp	r0,	#03h
	cmpc	r1,	#00h
	bgt	_$L66
	cmp	r2,	#01h
	cmpc	r3,	#00h
	ble	_$L65
_$L66 :
CBLOCK 8 3 170

;;   	return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 00ABH 0005H 001EH
	mov	er0,	#-1
CBLOCKEND 8 3 172
CBLOCKEND 8 2 176

;;  }
CLINEA 0000H 0001H 00B0H 0003H 0003H
_$L64 :
	pop	xr8
	rt

;;    }
CLINEA 0000H 0000H 00ACH 0005H 0005H
_$L65 :

;;   	TM0CON0 = TIME_CLK_MODE[T0_CS];
CLINEA 0000H 0001H 00ADH 0005H 0023H
	l	r0,	NEAR _TIME_CLK_MODE[er8]
	st	r0,	0f032h

;;   	T01M16 = T0M16;
CLINEA 0000H 0001H 00AEH 0005H 0013H
	mov	r0,	r10
	and	r0,	#01h
	beq	_$M9
	sb	0f032h.2
	bal	_$M10
_$M9 :
	rb	0f032h.2
_$M10 :

;;   return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 00AFH 0004H 001BH
	mov	er0,	#0 
	bal	_$L64
CBLOCKEND 8 1 176
CFUNCTIONEND 8


	rseg $$TM1CON0_init$time
CFUNCTION 9

_TM1CON0_init	:
CBLOCK 9 1 193

;; {
CLINEA 0000H 0001H 00C1H 0002H 0002H
CBLOCK 9 2 193
CARGUMENT 46H 0002H 0024H "T1_CS" 02H 00H 01H

;;   if(T1_CS > time_four){
CLINEA 0000H 0001H 00C2H 0004H 0019H
	cmp	r0,	#03h
	cmpc	r1,	#00h
	ble	_$L73
CBLOCK 9 3 194

;;   	return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 00C3H 0005H 001EH
	mov	er0,	#-1
CBLOCKEND 9 3 196
CBLOCKEND 9 2 199

;;  }
CLINEA 0000H 0001H 00C7H 0003H 0003H
	rt

;;    }
CLINEA 0000H 0000H 00C4H 0005H 0005H
_$L73 :

;;   	TM1CON0 = TIME_CLK_MODE[T1_CS];
CLINEA 0000H 0001H 00C5H 0005H 0023H
	l	r0,	NEAR _TIME_CLK_MODE[er0]
	st	r0,	0f036h

;;   return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 00C6H 0004H 001BH
	mov	er0,	#0 
	rt
CBLOCKEND 9 1 199
CFUNCTIONEND 9


	rseg $$TM2CON0_init$time
CFUNCTION 10

_TM2CON0_init	:
CBLOCK 10 1 221

;; {
CLINEA 0000H 0001H 00DDH 0002H 0002H
	push	fp
	mov	fp,	sp
	push	er8
	mov	er8,	er0
CBLOCK 10 2 221
CARGUMENT 46H 0002H 0028H "T2_CS" 02H 00H 01H
CARGUMENT 46H 0002H 0025H "T2_M" 02H 00H 01H
CARGUMENT 42H 0001H 0002H "T2FM_A" 02H 00H 00H
CLOCAL 4AH 0001H 0000H 0002H "r0" 02H 00H 00H
CLOCAL 4AH 0001H 0000H 0002H "r1" 02H 00H 00H
CLOCAL 4AH 0001H 0000H 0002H "r2" 02H 00H 00H

;;   	  (T2FM_A != (unsigned char)T2_FMA)){
CLINEA 0000H 0001H 00E0H 0007H 0029H
	cmp	r0,	#03h
	cmpc	r1,	#00h
	bgt	_$L77
	cmp	r2,	#03h
	cmpc	r3,	#00h
	bgt	_$L77
	l	r0,	2[fp]
	cmp	r0,	#0ah
	beq	_$L76
_$L77 :
CBLOCK 10 3 224

;;   	return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 00E1H 0005H 001EH
	mov	er0,	#-1
CBLOCKEND 10 3 226
CBLOCKEND 10 2 232

;;  }
CLINEA 0000H 0001H 00E8H 0003H 0003H
_$L75 :
	pop	er8
	mov	sp,	fp
	pop	fp
	rt

;;    }
CLINEA 0000H 0000H 00E2H 0005H 0005H
_$L76 :

;;   TM2CON0 = ((r0 << 0) | (r1 << 2) | (r2 << 4));
CLINEA 0000H 0001H 00E6H 0004H 0031H
	l	r0,	NEAR _TIME_CLK_MODE[er2]
	sll	r0,	#02h
	l	r1,	NEAR _TIME_CLK_MODE[er8]
	or	r0,	r1
	or	r0,	#0a0h
	st	r0,	0f03ah

;;   return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 00E7H 0004H 001BH
	mov	er0,	#0 
	bal	_$L75
CBLOCKEND 10 1 232
CFUNCTIONEND 10


	rseg $$TM3CON0_init$time
CFUNCTION 11

_TM3CON0_init	:
CBLOCK 11 1 245

;; {
CLINEA 0000H 0001H 00F5H 0002H 0002H
CBLOCK 11 2 245
CARGUMENT 46H 0002H 0024H "T3_CS" 02H 00H 01H

;;   if(T3_CS > time_four){
CLINEA 0000H 0001H 00F7H 0004H 0019H
	cmp	r0,	#03h
	cmpc	r1,	#00h
	ble	_$L87
CBLOCK 11 3 247

;;   	return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 00F8H 0005H 001EH
	mov	er0,	#-1
CBLOCKEND 11 3 249
CBLOCKEND 11 2 252

;;  }
CLINEA 0000H 0001H 00FCH 0003H 0003H
	rt

;;    }
CLINEA 0000H 0000H 00F9H 0005H 0005H
_$L87 :

;;   TM3CON0 = TIME_CLK_MODE[T3_CS];
CLINEA 0000H 0001H 00FAH 0004H 0022H
	l	r0,	NEAR _TIME_CLK_MODE[er0]
	st	r0,	0f03eh

;;   return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 00FBH 0004H 001BH
	mov	er0,	#0 
	rt
CBLOCKEND 11 1 252
CFUNCTIONEND 11


	rseg $$TM0CON1_init$time
CFUNCTION 12

_TM0CON1_init	:
CBLOCK 12 1 268

;; {
CLINEA 0000H 0001H 010CH 0002H 0002H
	push	xr8
	mov	er8,	er0
	mov	er10,	er2
CBLOCK 12 2 268
CARGUMENT 46H 0002H 0028H "T0_RUN" 02H 00H 01H
CARGUMENT 46H 0002H 0029H "T0_STAT" 02H 00H 01H

;; 	if((T0_RUN > TIME_HIGH) || (T0_STAT > TIME_HIGH)) {
CLINEA 0000H 0001H 010DH 0003H 0035H
	cmp	r0,	#01h
	cmpc	r1,	#00h
	bgt	_$L91
	cmp	r2,	#01h
	cmpc	r3,	#00h
	ble	_$L90
_$L91 :
CBLOCK 12 3 269

;;      return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 010EH 0007H 0020H
	mov	er0,	#-1
CBLOCKEND 12 3 271
CBLOCKEND 12 2 275

;; }
CLINEA 0000H 0001H 0113H 0002H 0002H
_$L89 :
	pop	xr8
	rt

;; 	}
CLINEA 0000H 0000H 010FH 0003H 0003H
_$L90 :

;;      T0RUN = T0_RUN;
CLINEA 0000H 0001H 0110H 0007H 0015H
	mov	r0,	r8
	and	r0,	#01h
	beq	_$M15
	sb	0f033h.0
	bal	_$M16
_$M15 :
	rb	0f033h.0
_$M16 :

;;      T0STAT = T0_STAT;
CLINEA 0000H 0001H 0111H 0007H 0017H
	mov	r0,	r10
	and	r0,	#01h
	beq	_$M17
	sb	0f033h.7
	bal	_$M18
_$M17 :
	rb	0f033h.7
_$M18 :

;;      return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 0112H 0007H 001EH
	mov	er0,	#0 
	bal	_$L89
CBLOCKEND 12 1 275
CFUNCTIONEND 12


	rseg $$TM1CON1_init$time
CFUNCTION 13

_TM1CON1_init	:
CBLOCK 13 1 290

;; {
CLINEA 0000H 0001H 0122H 0002H 0002H
	push	xr8
	mov	er8,	er0
	mov	er10,	er2
CBLOCK 13 2 290
CARGUMENT 46H 0002H 0028H "T1_RUN" 02H 00H 01H
CARGUMENT 46H 0002H 0029H "T1_STAT" 02H 00H 01H

;; 	if((T1_RUN > TIME_HIGH) || (T1_STAT > TIME_HIGH)) {
CLINEA 0000H 0001H 0123H 0003H 0035H
	cmp	r0,	#01h
	cmpc	r1,	#00h
	bgt	_$L99
	cmp	r2,	#01h
	cmpc	r3,	#00h
	ble	_$L98
_$L99 :
CBLOCK 13 3 291

;;      return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 0124H 0007H 0020H
	mov	er0,	#-1
CBLOCKEND 13 3 293
CBLOCKEND 13 2 297

;; }
CLINEA 0000H 0001H 0129H 0002H 0002H
_$L97 :
	pop	xr8
	rt

;; 	}
CLINEA 0000H 0000H 0125H 0003H 0003H
_$L98 :

;;      T1RUN = T1_RUN;
CLINEA 0000H 0001H 0126H 0007H 0015H
	mov	r0,	r8
	and	r0,	#01h
	beq	_$M20
	sb	0f037h.0
	bal	_$M21
_$M20 :
	rb	0f037h.0
_$M21 :

;;      T1STAT = T1_STAT;
CLINEA 0000H 0001H 0127H 0007H 0017H
	mov	r0,	r10
	and	r0,	#01h
	beq	_$M22
	sb	0f037h.7
	bal	_$M23
_$M22 :
	rb	0f037h.7
_$M23 :

;;      return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 0128H 0007H 001EH
	mov	er0,	#0 
	bal	_$L97
CBLOCKEND 13 1 297
CFUNCTIONEND 13


	rseg $$TM2CON1_init$time
CFUNCTION 14

_TM2CON1_init	:
CBLOCK 14 1 312

;; {
CLINEA 0000H 0001H 0138H 0002H 0002H
	push	xr8
	mov	er8,	er0
	mov	er10,	er2
CBLOCK 14 2 312
CARGUMENT 46H 0002H 0028H "T2_RUN" 02H 00H 01H
CARGUMENT 46H 0002H 0029H "T2_STAT" 02H 00H 01H

;; 	if((T2_RUN > TIME_HIGH) || (T2_STAT > TIME_HIGH)) {
CLINEA 0000H 0001H 0139H 0003H 0035H
	cmp	r0,	#01h
	cmpc	r1,	#00h
	bgt	_$L107
	cmp	r2,	#01h
	cmpc	r3,	#00h
	ble	_$L106
_$L107 :
CBLOCK 14 3 313

;;      return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 013AH 0007H 0020H
	mov	er0,	#-1
CBLOCKEND 14 3 315
CBLOCKEND 14 2 319

;; }
CLINEA 0000H 0001H 013FH 0002H 0002H
_$L105 :
	pop	xr8
	rt

;; 	}
CLINEA 0000H 0000H 013BH 0003H 0003H
_$L106 :

;;      T2RUN = T2_RUN;
CLINEA 0000H 0001H 013CH 0007H 0015H
	mov	r0,	r8
	and	r0,	#01h
	beq	_$M25
	sb	0f03bh.0
	bal	_$M26
_$M25 :
	rb	0f03bh.0
_$M26 :

;;      T2STAT = T2_STAT;
CLINEA 0000H 0001H 013DH 0007H 0017H
	mov	r0,	r10
	and	r0,	#01h
	beq	_$M27
	sb	0f03bh.7
	bal	_$M28
_$M27 :
	rb	0f03bh.7
_$M28 :

;;      return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 013EH 0007H 001EH
	mov	er0,	#0 
	bal	_$L105
CBLOCKEND 14 1 319
CFUNCTIONEND 14


	rseg $$TM3CON1_init$time
CFUNCTION 15

_TM3CON1_init	:
CBLOCK 15 1 333

;; {
CLINEA 0000H 0001H 014DH 0002H 0002H
	push	xr8
	mov	er8,	er0
	mov	er10,	er2
CBLOCK 15 2 333
CARGUMENT 46H 0002H 0028H "T3_RUN" 02H 00H 01H
CARGUMENT 46H 0002H 0029H "T3_STAT" 02H 00H 01H

;; 	if((T3_RUN > TIME_HIGH) || (T3_STAT > TIME_HIGH)) {
CLINEA 0000H 0001H 014EH 0003H 0035H
	cmp	r0,	#01h
	cmpc	r1,	#00h
	bgt	_$L115
	cmp	r2,	#01h
	cmpc	r3,	#00h
	ble	_$L114
_$L115 :
CBLOCK 15 3 334

;;      return (TIME_DEPLOY_FAIL);
CLINEA 0000H 0001H 014FH 0007H 0020H
	mov	er0,	#-1
CBLOCKEND 15 3 336
CBLOCKEND 15 2 340

;; }
CLINEA 0000H 0001H 0154H 0002H 0002H
_$L113 :
	pop	xr8
	rt

;; 	}
CLINEA 0000H 0000H 0150H 0003H 0003H
_$L114 :

;;      T3RUN = T3_RUN;
CLINEA 0000H 0001H 0151H 0007H 0015H
	mov	r0,	r8
	and	r0,	#01h
	beq	_$M30
	sb	0f03fh.0
	bal	_$M31
_$M30 :
	rb	0f03fh.0
_$M31 :

;;      T3STAT = T3_STAT;
CLINEA 0000H 0001H 0152H 0007H 0017H
	mov	r0,	r10
	and	r0,	#01h
	beq	_$M32
	sb	0f03fh.7
	bal	_$M33
_$M32 :
	rb	0f03fh.7
_$M33 :

;;      return (TIME_DEPLOY_OK);
CLINEA 0000H 0001H 0153H 0007H 001EH
	mov	er0,	#0 
	bal	_$L113
CBLOCKEND 15 1 340
CFUNCTIONEND 15

	public _TM3D_init
	public _TM0D_init
	public _TM1D_init
	public _TM2D_init
	public _TM0CON0_init
	public _TM1CON1_init
	public _TM2CON1_init
	public _TM3CON1_init
	public _TM0C_init
	public _TM1C_init
	public _TM2C_init
	public _TM3C_init
	public _TM0CON1_init
	public _TIME_CLK_MODE
	public _TM1CON0_init
	public _TM2CON0_init
	public _TM3CON0_init
	extrn code near : _main

	rseg $$NINITTAB
	db	00h
	db	01h
	db	02h
	db	03h

	rseg $$NINITVAR
_TIME_CLK_MODE :
	ds	04h

	end
